package com.joker.demo.controller;


import com.joker.demo.service.ToolAssistant;
import com.joker.demo.service.handler.InvoiceHandler;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : feixiang.li
 * @since : 2025-09-25 20:29
 */
@RestController
@RequestMapping("/tools")
public class ToolsController {


    @Resource
    ToolAssistant toolAssistant;


    @RequestMapping("/hello")
    public String hello() {
        String chat = toolAssistant.chat("开张发票，公司：kk公司，税号：1102212，金额为668.12");
        System.out.println(chat);
        String chat1 = toolAssistant.chat("我的公司为 xx公司，我有张100块的金额，税号不知道");
        System.out.println(chat1);
        return chat;
    }

    @Autowired
    @Qualifier("highApi")
    ToolAssistant toolAssistant1;

    @RequestMapping("/invoice")
    public String invoice() {
        String chat = toolAssistant.chat("开张发票，公司：kk公司，税号：1102212，金额为668.12");
        System.out.println(chat);
        return chat;
    }

}
